@extends('layouts.default') @section('main')
<link rel="stylesheet" href="/css/uniform.css" />
<link rel="stylesheet" href="/css/select2.css" />

<div id="content">
  <div id="content-header">
    <div id="breadcrumb"> <a href="{{url('home')}}" title="返回首页" class="tip-bottom"><i class="icon-home"></i> 首页</a> <a href="{{url('project/index')}}" class="tip-bottom">项目管理</a><a href="{{url('project/info?id='.$project_id)}}" class="tip-bottom">项目信息</a> <a href="#" class="current">项目收藏管理</a> </div>
  </div>
  <div class="container-fluid">
    <div class="row-fluid">
      <div class="span12">
      	{{--<a href="{{url('project/membercreate?id='.$project_id)}}"><button class="btn">新增</button></a>--}}
        <div class="widget-box">
          <div class="widget-title"> <span class="icon"><i class="icon-th"></i></span>
            <h5>项目收藏管理</h5>
          </div>
   
          <div class="widget-content nopadding">
            <table class="table table-bordered table-striped">
              <thead>
                <tr>
                  <th>收藏ID</th>
                  <th>收藏者用户名</th>
                  <th>收藏的项目ID</th>
                  <th>收藏的项目名</th>
                  <th>收藏时间</th>
                  <th>状态</th>
                  <th>操作</th>
                </tr>
              </thead>
              <tbody>
              	@foreach($favourites as $key => $favourite)
                <tr class="gradeX">
                  <td>{{ $favourite->id }}</td>
                  <td>{{ $favourite->user->nickname }}</td>
                  <td>{{ $project->id }}</td>
                  <td>{{ $project->subject }}</td>
                  <td><?php echo date('Y-m-d',strtotime($favourite->created_at)); ?></td>
                  <td>@if($favourite->status == 1)正常@else禁用@endif</td>
                  <td class="center"> 
	                  {{--<a data-original-title="删除" id="delete" class="tip delete" href="{{url('project/favouritedelete?id='.$favourite->id)}}"><i class="icon-remove"></i></a> --}}
                  </td>
                </tr>
                @endforeach
              </tbody>
            </table>
          </div>
        </div><?php echo $favourites->render();?>
      </div>
    </div>
  </div>
</div>
<script src="/js/matrix.tables.js"></script>

<script>

$(".delete").click(function(){
   if(confirm("确认删除")){
      return true;
   }else{
      return false;
   }
});
    
</script>
@stop
